﻿using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Package;
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider;

namespace Agile_Planner_Platform.AgilePlanner
{
    [Guid("3CC076B4-CEE3-4A38-8FC4-AEF4E15C4561")]
    public class AgilePlannerProjectFactory : ProjectFactory
    {
        #region Fields
        private VsPackage package;
        #endregion

        #region Constructors
        public AgilePlannerProjectFactory(VsPackage package)
            : base(package)
        {
            this.package = package;
        }
        #endregion

        #region Overriden implementation
        protected override ProjectNode CreateProject()
        {
            AgilePlannerProjectNode project = new AgilePlannerProjectNode(this.package);
            project.SetSite((IOleServiceProvider)((IServiceProvider)this.package).GetService(typeof(IOleServiceProvider)));
            return project;
        }
        #endregion
    }
}
